#ifndef WORKTHREAD_H
#define WORKTHREAD_H
#include <QThread>
#include <QObject>

class workThread : public QThread
{
    Q_OBJECT
public:
    workThread(
            /************************General**********************/
            std::string cloudPath,
            int         N,
            float       myScale,                     //    = 0.02;
            float       myAngleLimit,                //    = 10.;
            float       myPopLimit,                  //    = 10.;
            bool        verbose,                     //    = false;
            bool        no_paral,                    //    = false;
            /****************generate*****************************/
            float       mySmallThreshMult,           //    = 4.;
            float       myAngleLimitDivisor,         //    = 1.0;
            float       patch_dist_limit,            //    = 1.0;
            bool        safe_mode,                   //    = false;
            bool        keepSingles,                 //   = true;
            bool        allowPromoted,               //   = true;
            bool        adoptChanged,                //   = false;
            bool        myTripletSafe,               //    = true;
            /****************Formulate*****************************/
            float       myData,                      //    = 1e5;
            float       myPw,                        //    = 0.01;
            float       collapseThreshDeg,           //    = 0.4;
            /****************Merge*****************************/
            int         adopt                        //   = 0;
            );
    void run();
private:
    /************************General**********************/
    std::string cloudPath;
    int         N;
    float       myScale;                     //    = 0.02;
    float       myAngleLimit;                //    = 10.;
    float       myPopLimit;                  //    = 10.;
    bool        verbose;                     //    = false;
    bool        no_paral;                    //    = false;
    /****************generate*****************************/
    float       mySmallThreshMult;           //    = 4.;
    float       myAngleLimitDivisor;         //    = 1.0;
    float       patch_dist_limit;            //    = 1.0;
    bool        safe_mode;                   //    = false;
    bool        keepSingles;                 //   = true;
    bool        allowPromoted;               //   = true;
    bool        adoptChanged;                //   = false;
    bool        myTripletSafe;               //    = true;
    /****************Formulate*****************************/
    float       myData;                      //    = 1e5;
    float       myPw;                        //    = 0.01;
    float       collapseThreshDeg;           //    = 0.4;
    /****************Merge*****************************/
    int         adopt;                        //   = 0;
    void work(
            /************************General**********************/
            std::string cloudPath,
            int         N,
            float       myScale,                     //    = 0.02;
            float       myAngleLimit,                //    = 10.;
            float       myPopLimit,                  //    = 10.;
            bool        verbose,                     //    = false;
            bool        no_paral,                    //    = false;
            /****************generate*****************************/
            float       mySmallThreshMult,           //    = 4.;
            float       myAngleLimitDivisor,         //    = 1.0;
            float       patch_dist_limit,            //    = 1.0;
            bool        safe_mode,                   //    = false;
            bool        keepSingles,                 //   = true;
            bool        allowPromoted,               //   = true;
            bool        adoptChanged,                //   = false;
            bool        myTripletSafe,               //    = true;
            /****************Formulate*****************************/
            float       myData,                      //    = 1e5;
            float       myPw,                        //    = 0.01;
            float       collapseThreshDeg,           //    = 0.4;
            /****************Merge*****************************/
            int         adopt                        //   = 0;
            );

signals:
    void sendIt(int);

};


#endif
